//api文件仍保留但不建议使用，推荐使用models中的api。API files remain preserved (deprecated), use models APIs instead.
import type { MinishopUserCoupons, MinishopUserCouponsResponse } from './types.js';

import { requestClient } from '#/api/request';

export const getuctooMinishopUserCouponsList = async (page: number, pageSize: number,
  searchParams?: any) => {
  return requestClient.get<MinishopUserCouponsResponse>(`/uctoo/minishop_user_coupons/${pageSize}/${page}`,{
    params: searchParams,
  });
};

export const getuctooMinishopUserCoupons = async (id: string) => {
  return requestClient.get<MinishopUserCoupons>(`/uctoo/minishop_user_coupons/${id}`);
};

export const adductooMinishopUserCoupons = async (data: Partial<MinishopUserCoupons>) => {
  return requestClient.post<MinishopUserCoupons>('/uctoo/minishop_user_coupons/add', data);
};

export const edituctooMinishopUserCoupons = async (data: Partial<MinishopUserCoupons>) => {
  return requestClient.post<MinishopUserCoupons>('/uctoo/minishop_user_coupons/edit', data);
};

export const deleteuctooMinishopUserCoupons = async (id: string) => {
  return requestClient.post<any>('/uctoo/minishop_user_coupons/del', { id });
};
